<template>
  <div class="row">
    <div style="display: flex; align-items: center; flex-direction: row">
      <div>
        <text class="title" style="padding-right: 4px">{{ title }}</text>
      </div>

      <div>
        <text class="sub">{{ sub }}</text>
      </div>
    </div>
    <div style="flex-grow: 1"></div>
    <div v-if="onClickMore" @click="onClickMore">
      <text>更多</text>
      <img src="@/assets/back.svg" style="width: 16px; height: 16px" />
    </div>
  </div>
</template>

<script lang="ts" setup>
import router from '@/router/index'
import { ref, defineProps } from 'vue'

const props = defineProps(['title', 'sub', 'onClickMore'])
</script>

<style lang="scss" scoped>
.row {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-top: 20px;
  .title {
    font-size: 20px;
    color: grey;
    font-weight: bold;
  }
  .sub {
    font-size: 14px;
  }
}
</style>